import request from '@/utils/request'

export default {
    //医院设置列表
    getListPage(current, limit, searchObj) {
        return request({
            url: `/admin/hosp/hospitalSet/find/${current}/${limit}`,
            method: 'post',
            data: searchObj //使用json
        })
    },
    //根据id删除医院设置
    removeDataById(id){
        return request({
            url: `/admin/hosp/hospitalSet//deleteById`,
            method: 'delete',
            params: {id}
        })
    },
    //批量删除医院设置
    removeHospitalIdList(idList){
        return request({
            url: `/admin/hosp/hospitalSet/deleteHospitalIds`,
            method: 'delete',
            data: idList
        })
    },
    //锁定医院设置的签名
    hospitalLock(id,status){
        return request({
            url: `/admin/hosp/hospitalSet/lockHospital/${id}/${status}`,
            method: 'put'
        })
    },
    //新增医院的设置
    saveHospitalSet(hospitalset){
        return request({
            url: `/admin/hosp/hospitalSet/saveHospital`,
            method: 'post',
            data: hospitalset
        })    
    },
    //得到医院设置的信息
    getHospitalSetInfo(id){
        return request({
            url: `/admin/hosp/hospitalSet/getHospitalSetInfo/${id}`,
            method: 'get'
        }) 
    },
    //修改医院的设置
    updateHospitalSet(hospitalSet){
        return request({
            url: `/admin/hosp/hospitalSet/updateHospital`,
            method: 'post',
            data: hospitalSet
        })
    }
}